Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use credentials from config in monitoring checks #79

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Conversation

Alex-Burmak
Copy link
Member

No description provided.

user = config["monitoring_user"]
password = config["monitoring_password"]

user, password = clickhouse_credentials(ctx)
ctx.obj["chcli"] = ClickhouseClient(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we maintain two ClickhouseClient classes ? This and from monrun_checks.
Could we use only from ctx.obj["chcli"] ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, it's redundant and confusing. It's better to leave only one client, but right now these two clients have no feature parity. The client from monrun_checks supports auto-detection of ports to use from config file, supports multiple ClickHouse protocols, but lack some other features.

In this PR I limited the changes to one small thing - use credentials from config file when connecting to ClickHouse in monitoring commands / monrun checks.

Copy link
Contributor

@aalexfvk aalexfvk Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see. I'm going to create a task about merging them

@aalexfvk aalexfvk merged commit 67ed2a6 into main Nov 24, 2023
18 checks passed
@aalexfvk aalexfvk deleted the MDB-26402 branch November 24, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants